﻿namespace MSSqlSchemaDoc.Core.DataStructures
{
    using System.Xml.Serialization;

    /// <summary>
    /// Represents a data type.
    /// </summary>
    public class DataType
    {
        /// <summary>
        /// Gets or sets the name of the type.
        /// </summary>
        [XmlAttribute()]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the maximum length of the type (in bytes).
        /// </summary>
        [XmlElement()]
        public int MaxLength { get; set; }

        /// <summary>
        /// Gets or sets the precision of the data type - if relevant.
        /// </summary>
        [XmlElement()]
        public int Precision { get; set; }

        /// <summary>
        /// Gets or sets the scale of the data type - if relevant.
        /// </summary>
        [XmlElement()]
        public int Scale { get; set; }
    }
}
